package alibaba.ifelserefactor.demo01.test01;

import alibaba.ifelserefactor.demo01.ShareType;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

/**
 * @author ChangLiang
 * @date 2020/4/20
 */
@Slf4j
public class ShareServiceTest {

    @Test
    @DisplayName("test share service V1")
    public void test() {
        ShareItem shareItem = new ShareItem();
        shareItem.setType(ShareType.TYPE_LINK);
        shareItem.setLink("http://www.guavacache.com");
        ShareService shareService = new ShareService();
        shareService.share(shareItem, (state, msg) -> log.info(msg));
    }
}
